export const optionConfig = (dataMTXX, dataMTXY, dataMVCTX, dataMVCTY) => {
    return {
        tooltip: {
            trigger: "axis",
            axisPointer: {
                // 坐标轴指示器，坐标轴触发有效
                type: "shadow" // 默认为直线，可选为：'line' | 'shadow'
            }
        },
        legend: {
            right: "3%",
            data: ["直接访问", "邮件营销"],
            left: 10,
        },
        grid: {
            left: "3%",
            right: "4%",
            bottom: "3%",
            top: '23%',
            containLabel: true
        },
        xAxis: [{
            type: "category",
            data: dataMTXX,
            axisTick: {
                show: false
            },
            axisLine: {
                show: true,
                lineStyle: {
                    color: '#FFF'
                }
            },
        }],
        yAxis: [{
            type: "value",
            axisLine: {
                show: false,
                lineStyle: {
                    color: '#FFF'
                }
            },
            axisLabel: {
                color: '#fff',
                fontSize: 16
            },
            axisTick: {
                show: false
            },
            interval: 20
        }],
        series: [{
            name: "直接访问",
            type: "bar",

            barGap: "0", // 柱图间距
            itemStyle: {
                normal: {
                    color: "#409DFF"
                }
            },
            data: dataMTXY
        },
            {
                name: "邮件营销",
                type: "bar",
                barGap: "0", // 柱图间距
                itemStyle: {
                    normal: {
                        color: "#FF70A3"
                    }
                },
                data: dataMVCTY
            }
        ]
    }
}
